package procilege.lang;

public class PredicateEntity implements PredicateExpr {

	private Name name;

	public PredicateEntity(Name name) {

		this.name = name;
	}

	public Name getName() {
		return name;
	}

	public void setName(Name name) {
		this.name = name;
	}

	public BoolExprOr norm() {

		BoolExprOr orExpr = new BoolExprOr();
		BoolExprAnd andExpr = new BoolExprAnd();
		andExpr.and((PredicateEntity) this.clone());
		orExpr.or(andExpr);

		return orExpr;
	}

	public Object clone() {

		PredicateEntity obj = null;

		try {
			obj = (PredicateEntity) super.clone();
		} catch (CloneNotSupportedException e) {
			throw new RuntimeException(e);
		}

		obj.name = this.name;

		return obj;
	}
}
